<?php
class Dialog extends Object {
	
	function yesNo($text, $title = '') {
		$dialog = new GtkMessageDialog(
			null,
			0,
			Gtk::MESSAGE_QUESTION,
			Gtk::BUTTONS_NONE,
			$title
			);
		$dialog->set_markup($text);
		$dialog->add_button('Yes', 1);
		$dialog->add_button('No', 2);
		$dialog->add_button('Cancel', false);

		$answer = $dialog->run();
		$dialog->destroy();
		return $answer;
	}
	
}
?>